package com.atguigu.exam.service;

import com.atguigu.exam.entity.ExamRecord;
import com.atguigu.exam.vo.StartExamVo;
import com.atguigu.exam.vo.SubmitAnswerVo;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * 考试服务接口
 */
public interface ExamService extends IService<ExamRecord> {
    /**
     * 学生开始考试，创建考试记录并返回试卷内容
     * @param startExamVo
     * @return examRecord
     * */
    ExamRecord startExam(StartExamVo startExamVo);
    /**
     * 查询考试记录详情
     * @param id
     * @return examRecord
     * */
    ExamRecord findExamRecordById(Integer id);
    /**
     * 提交考试答案
     * @param examRecordId
     * @param answers
     * */
    void submitAnswer(Integer examRecordId, List<SubmitAnswerVo> answers);
    /**
     * AI试卷批阅功能
     * @param examRecordId
     * @return examRecord
     * */
    ExamRecord gradeExam(Integer examRecordId);
}
 